.PHONY: all
all: install compdb
	cp out/repo-json ./repo

out:
	mkdir out

out/repo-json: gn
	ninja -C out

.PHONY: gn
gn: .gn out
	gn gen out

.PHONY: compdb
compdb: gn
	ninja -C out -t compdb > compile_commands.json

.PHONY: clean
clean:
	gn clean out

.PHONY: install
install: out/repo-json
	cp out/repo-json ~/.local/bin/
